package com.securitytrace.service.impl;


import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringUtils {

	private static ApplicationContext applicationContext;
	
	static {
		applicationContext = new ClassPathXmlApplicationContext("spring-service.xml", "spring-hibernate.xml");
	}
	
	public static Object getBean(String serviceName) {
		return applicationContext.getBean(serviceName);
	}
	
	public static ApplicationContext getApplicationContext() {
		return applicationContext; 
	}
}
